﻿using System;
using System.Reflection;

namespace PageAdmin.Utils.ORM.PropertyDescriptor
{
    /// <summary>
    /// 关联数据的映射描述器
    /// </summary>
    public class RelateDataMappedDescriptor
    {

        /// <summary>
        /// 相关数据对应的模型类型
        /// </summary>
        public Type RelateModelType { get; set; }
        /// <summary>
        /// 数据键名
        /// </summary>
        public string ValueKey { get; set; }

        /// <summary>
        ///数据键名属性
        /// </summary>
        public PropertyInfo ValueKeyPropertyInfo { get; set; }

        /// <summary>
        /// 关联的目标实体键名
        /// </summary>
        public string RelateKey { get; set; }


        /// <summary>
        /// 详情数据是否同步加载
        /// </summary>
        public bool DetailSyncLoad { get; set; }

        /// <summary>
        /// 列表数据是否同步加载
        /// </summary>
        public bool ListSyncLoad { get; set; }


        /// <summary>
        /// 读取的自定义条件
        /// </summary>
        public string SqlCondition { get; set; }

        /// <summary>
        /// 读取数据排序方式
        /// </summary>
        public string OrderBy { get; set; }

    }
}